<template>
  <div class="bottombar">
     <div class="choose">
       <img src="~assets/img/detailbottombar/service.png"/>
       <div><span>客服</span></div>
     </div>
     <div  class="choose">
       <img src="~assets/img/detailbottombar/dianpu.png"/>
       <div><span>店铺</span></div>
     </div>
     <div  class="choose">
       <img src="~assets/img/detailbottombar/shoucang.png"/>
       <div><span>收藏</span></div>
     </div>
     <div class="choosetext" @click="addcarts"><span>加入购物车</span></div>
     <div class="choosebuy"><span>购买</span></div>
  </div>
</template>

<script>
import {mapActions} from 'vuex'
export default {
  name:'childenbottombar',
  methods: {
    addcarts(){
      this.$emit('addcarts')
      
    }
  },
  computed: {
    ...mapActions(['addcats'])
  }
}
</script>

<style scoped>
.bottombar{
  width: 100vw;
  height: 49px;
  position: fixed;
  background-color: #ffffff;
  left: 0;
  right: 0;
  display: flex;
  text-align: center;
  border-top: 2px solid  rgb(192,192,192);
}
.bottombar img{
  width: 25px;
  height: 25px;
}
.choose{
  flex: 1;
}
.choosetext{
  flex:2;
  background-color: yellow;
  line-height: 49px;
  font-size: 17px;
  color: black;
  
}
.choosebuy{
  flex: 2;
  background-color: var(--color-text);
  padding: 0 10px;
   line-height: 49px;
   font-size: 17px;
   color: white;
   font-weight: bold;
}
</style>